package com.example.mylibrary.testActivity.MVP_BASE.test;

import android.util.Log;
import android.widget.TextView;

import com.example.mylibrary.R;
import com.example.mylibrary.testActivity.MVP_BASE.MVP_Base_Activity;


public class MVP_Activity extends MVP_Base_Activity<MVP_Contract.Presenter> implements  MVP_Contract.View{
    TextView textView2;TextView d;
    @Override
    public int initLayout() {
        return R.layout.activity_mvp_;
    }

    @Override
    public void initData() {
        textView2 = findViewById(R.id.textView2);
        mPresenter.test(null);
        d.setText("");
    }

    @Override
    public void initResume() {

    }

    @Override
    public void initDestroy() {

    }

    @Override
    public void upDateUI(String str) {
        textView2.setText(str);
    }
    @Override
    public void noData(String str) {

    }

    @Override
    public void onShowLoading() {

    }

    @Override
    public void onHideLoading() {

    }

    @Override
    public void onShowNetError() {

    }

    @Override
    public void setPresenter(MVP_Contract.Presenter presenter) {
        if (presenter == null) mPresenter = new MVP_Presenter(this);
        else Log.i("TAG", "setPresenter: + Presenter为空");
    }
}
